﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Common/Site.Master" AutoEventWireup="true" CodeBehind="UploadUserImg.aspx.cs" Inherits="FortuneHeaven.Web.Pages.UserCenter.UploadUserImg" %>
<%@ Register Src="~/Controls/UserInforHead.ascx" TagPrefix="uc" TagName="UserInforHead" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
<link type="text/css" rel="stylesheet" href="../../Content/CSS/person.css" />
<link href="../../ThridParty/UploadJS/fileuploader.css" rel="stylesheet" type="text/css">	
 <script src="../../ThridParty/UploadJS/fileuploader.js" type="text/javascript"></script>
 <script>

     $(document).ready(function () {
         var tfd = new qq.FileUploader({
             action: '<%= this.ResolveUrl("~/Pages/ImageHandler.ashx")%>?upload=1',
             sizeLimit: 5242880,
             element: document.getElementById("updatebtn"),
             multiple: false,
             debug: true,
             allowedExtensions: ["jpg", "bmp", "gif", "JPG", "BMP", "GIF"],
             onComplete: function (id, fileName, responseJSON) {
                 if (responseJSON.success) {
                     $(".userhead").attr("src", responseJSON.url);
                 }
                 else {
                     document.location = '<%= this.ResolveUrl("~/Login.aspx")%>';
                 }
                 //alert(responseJSON.url);
             }
         });
     });
</script>  
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
<div id="main">
      <div class="top"><span class="left">个人中心</span><span class="right">欢迎您，<asp:Literal id="ltName" runat="server"></asp:Literal></span></div>
      <div class="body">
        <uc:UserInforHead id="ucInforHead"  runat="server"></uc:UserInforHead>
         <div class="uploding">
            <div class="left">
               <div id="updatebtn"></div>
               <div>仅支持JPG、GIF、PNG图片文件，且文件小于5M</div>
            </div>
            <div class="right">
              <div class="rleft">
                 <div class="ts">您上传的图像会自动生成三种尺寸，请注意中小尺寸的头像是否清晰</div>
                 <div class="pic pic1"><a href="javascript://"><img class="userhead" style=" height:180px; width:180px;" src="../../Content/Image/Main/prbg2.jpg"></a></div>
                 <h4>大尺寸头像，180×180像素</h4>
              </div>
              <div class="rright">
                 <div class="pic pic2"><a href="javascript://"><img class="userhead" style=" height:50px; width:50px;" src="../../Content/Image/Main/prbg3.jpg"></a></div>
                 <h4>中尺寸头像，<br>50×50像素<br>自动生成</h4>
                 <div class="pic pic3"><a href="javascript://"><img class="userhead" style=" height:32px; width:32px;"  src="../../Content/Image/Main/prbg4.jpg"></a></div>
                 <h4>小尺寸头像，<br>32×32像素<br>自动生成</h4>
              </div>
              <div class="clear"></div>
             </div>
            <div class="clear"></div>
         </div>
      </div>
    </div>
</asp:Content>
